/**
 * ****************************************************************************
 * @file            atk_idm750c.h
 * @author          ����ԭ���Ŷӣ�ALIENTEK��
 * @version         V1.0
 * @data            2020-06-21
 * @brief           ATK-IDM750Cģ��Ӧ����������
 * @copyright       Copyright (c) 2020-2032, ������������ӿƼ����޹�˾
 * ****************************************************************************
 * @attention       
 * 
 * ʵ��ƽ̨������ԭ�� ��Ӣ�� STM32F103������
 * ������Ƶ:www.yuanzige.com
 * ������̳:www.openedv.com
 * ��˾��ַ:www.alientek.com
 * �����ַ:openedv.taobao.com
 * 
 * �޸�˵��
 * V1.0 20200621
 * ��һ�η���
 * ****************************************************************************
*/

#ifndef __ATK_IDM750C_H
#define __ATK_IDM750C_H

#include "main.h"
struct SensorDataType
{
		uint8_t len;
	  uint8_t data[120];
};	

typedef uint8_t (* uart_484_get_data)(struct SensorDataType cmd,struct SensorDataType ackHead,uint32_t acklen,uint32_t timeout);
typedef void (*uart_485_hex_send)(struct SensorDataType _data);
typedef void (*uart_485_rx_restart)(void);                 
typedef uint8_t* (*uart_485_rx_get_frame)(void);           
typedef uint16_t (*uart_485_rx_get_frame_len)(void); 

void sensorModeThreadStop(void);
int sensorModuleInit(void);
void sensorThreadEntry(void *para);

void sensor_init(void);
void get_sensor_data(uint8_t idFor485,uint32_t sensor_id);
void sensor_init_send(uint32_t sensor_id);

uint8_t uart_485_1_send_cmd(char *cmd, char *ack, uint32_t timeout);
uint8_t uart_484_1_get_data(struct SensorDataType cmd,struct SensorDataType ackHead,uint32_t acklen,uint32_t timeout);
uint8_t uart_484_2_get_data(struct SensorDataType cmd,struct SensorDataType ackHead,uint32_t acklen,uint32_t timeout);
#endif
